package com.zjc.app.api.sdk.client;

import com.google.gson.reflect.TypeToken;
import com.zjc.app.api.sdk.dto.ResultDto;
import com.zjc.app.api.sdk.dto.request.KsVehicleDebugResultDto;
import com.zjc.app.api.sdk.exception.AppBizRuntimeException;

import java.io.IOException;

public class KsClient extends BaseClient {

    public KsClient(String serverUrl, String appId, String appSecret, Integer connectTimeout, Integer readTimeout) {
        super(serverUrl, appId, appSecret, connectTimeout, readTimeout);
    }

    /**
     * 凯商出厂调试参数结果保存
     * @param request
     * @return
     * @throws IOException
     * @throws AppBizRuntimeException
     */
    public ResultDto saveKSDebugLog(KsVehicleDebugResultDto request) throws IOException, AppBizRuntimeException {
        String url = "/v1/ks/ksVehicleDebugLog.save";
        return super.doPost(url, request, new TypeToken<ResultDto<Boolean>>() {});
    }

}
